<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
</head>
<body>
<%
    Object user = session.getAttribute("user");

    //如果==null说明没有登录
    if(user == null){
        request.getRequestDispatcher("/login.jsp").forward(request,response);
        return;
    }
%>
我是a.jsp文件

</body>
</html>
